package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author Mr.Xiayh
 * @since 2024-06-04
 */
@Getter
@Setter
@ApiModel(value = "Goods对象", description = "商品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品ID")
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Integer goodsId;

    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("商品销量")
    private Integer goodsSales;

    @ApiModelProperty("商品库存")
    private Integer goodsInventory;

    @ApiModelProperty("发货地址")
    private String goodsAddress;

    @ApiModelProperty("生产日期")
    private LocalDate goodsTime;

    @ApiModelProperty("保质日期")
    private LocalDate goodsOutTime;

    @ApiModelProperty("重量")
    private Double goodsWeight;

    @ApiModelProperty("商品详细")
    private String goodsInfo;

    @ApiModelProperty("价格")
    private BigDecimal goodsPrice;

    @ApiModelProperty("上下架状态 0下架 1上架 2 缺货")
    private Integer goodsFlag;

    @ApiModelProperty("1 食品 2 用品 3 洗护")
    private Integer goodsTypeId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

//    @ApiModelProperty("状态码 1 有效 0无效")
//    private Integer flag ;
}
